<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
	<div th:replace="common/admin-header.html :: adminCss"/>
	<body>
		<div class="layui-tab page-content-wrap">
			<ul class="layui-tab-title">
				<li class="layui-this">首页banner图</li>
				<li>其他图片上传</li>
			</ul>
			<div class="layui-tab-content">
				<!--首页banner图-->
				<div class="layui-tab-item layui-show">
					<input type="file" name="file(bannerPicture)" class="layui-upload-file" lay-type="images">
				</div>
				<!--SEO配置-->
				<div class="layui-tab-item">
					<form class="layui-form" style="width: 90%;padding-top: 20px;">
						<div class="layui-form-item">
							<label class="layui-form-label">SEO标题：</label>
							<div class="layui-input-block">
								<input type="text" name="title" placeholder="请输入seo标题" autocomplete="off" class="layui-input" value="">
							</div>
						</div>
						<div class="layui-form-item">
							<label class="layui-form-label">关键字：</label>
							<div class="layui-input-block">
								<input type="text" name="keyword" placeholder="请输入seo关键字" autocomplete="off" class="layui-input" value="">
							</div>
						</div>
						<div class="layui-form-item layui-form-text">
							<label class="layui-form-label">描述：</label>
							<div class="layui-input-block">
								<textarea name="desc" placeholder="请输入seo描述" class="layui-textarea"></textarea>
							</div>
						</div>
						<div class="layui-form-item">
							<div class="layui-input-block">
								<button class="layui-btn layui-btn-normal" lay-submit lay-filter="seoInfo">立即提交</button>
							</div>
						</div>
					</form>
				</div>
			</div>
		</div>
		<script th:src="@{${path} + '/admin/layui/layui.js'}"  type="text/javascript" charset="utf-8"></script>
		<script>
			layui.use(['element','upload'], function() {
				layui.upload({
					url: '[[${path}]]/upload/file',
					title : '添加图片',
					before:function(){
						var loading = layer.load(0, {
							shade: false,
							time: 10*1000
						});
					},
					success: function(res){
						console.log(res); //上传成功返回值，必须为json格式
					}
				});
			});
		</script>
	</body>

</html>